<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //concat()方法，连接多个数组，返回新数组，对原数组无影响
        //连接合并2个数组
        var arr1 = [1,2,3];
        var arr2 = [6,7,8];
        console.log(arr1.concat(arr2));

        //连接合并3个数组
        var arr1 = [3];
        var arr2 = [4,5];
        var arr3 = [6,7,8];
        console.log(arr1.concat(arr2,arr3));
    </script>
</head>
<body>
    
</body>
</html>